// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_FIN_ACCOUNTS_RECEIVABLE_ORDER
// * CreateDate    : 2012/2/2 10:17:12
// * Creater       : CodeSmith
// * LastChangeDate: 2012/2/2 10:17:12
// * LastChanger   : 2012/2/2 10:17:12
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class FinAccountsReceivableOrderEntity : EntityBase
    {
        public FinAccountsReceivableOrderTable TableSchema
        {
            get
            {
                return FinAccountsReceivableOrderTable.Current;
            }
		}
		
		public FinAccountsReceivableOrderEntity()
        {

        }
		
		public FinAccountsReceivableOrderEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ReceivableOrderId = Convert.ToString(CommonFunctions.ToObject(dr["RECEIVABLE_ORDER_ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.InvoiceCode = Convert.ToString(CommonFunctions.ToObject(dr["INVOICE_CODE"]));
			this.InvoicePerson = Convert.ToString(CommonFunctions.ToObject(dr["INVOICE_PERSON"]));
			this.InvoiceDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["INVOICE_DATE"]));
			this.TotalAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["TOTAL_AMOUNT"]));
			this.InvoiceAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["INVOICE_AMOUNT"]));
			this.ReceivedAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["RECEIVED_AMOUNT"]));
			this.PaidPerson = Convert.ToString(CommonFunctions.ToObject(dr["PAID_PERSON"]));
			this.PaidDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["PAID_DATE"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.Currency = Convert.ToString(CommonFunctions.ToObject(dr["CURRENCY"]));
			this.InvoiceNo = Convert.ToString(CommonFunctions.ToObject(dr["INVOICE_NO"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }
		
		public FinAccountsReceivableOrderEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ReceivableOrderId = Convert.ToString(CommonFunctions.ToObject(dr["RECEIVABLE_ORDER_ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.InvoiceCode = Convert.ToString(CommonFunctions.ToObject(dr["INVOICE_CODE"]));
			this.InvoicePerson = Convert.ToString(CommonFunctions.ToObject(dr["INVOICE_PERSON"]));
			this.InvoiceDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["INVOICE_DATE"]));
			this.TotalAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["TOTAL_AMOUNT"]));
			this.InvoiceAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["INVOICE_AMOUNT"]));
			this.ReceivedAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["RECEIVED_AMOUNT"]));
			this.PaidPerson = Convert.ToString(CommonFunctions.ToObject(dr["PAID_PERSON"]));
			this.PaidDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["PAID_DATE"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
			this.Currency = Convert.ToString(CommonFunctions.ToObject(dr["CURRENCY"]));
			this.InvoiceNo = Convert.ToString(CommonFunctions.ToObject(dr["INVOICE_NO"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return FinAccountsReceivableOrderTable.Current;
            }
        }
		
		#region Perporty List
        public string ReceivableOrderId
        {
            get { return Convert.ToString(GetData(FinAccountsReceivableOrderTable.C_RECEIVABLE_ORDER_ID)); }
            set { SetData(FinAccountsReceivableOrderTable.C_RECEIVABLE_ORDER_ID, value); }
        }
		
        public string CustomerId
        {
            get { return Convert.ToString(GetData(FinAccountsReceivableOrderTable.C_CUSTOMER_ID)); }
            set { SetData(FinAccountsReceivableOrderTable.C_CUSTOMER_ID, value); }
        }
		
        public string InvoiceCode
        {
            get { return Convert.ToString(GetData(FinAccountsReceivableOrderTable.C_INVOICE_CODE)); }
            set { SetData(FinAccountsReceivableOrderTable.C_INVOICE_CODE, value); }
        }
		
        public string InvoicePerson
        {
            get { return Convert.ToString(GetData(FinAccountsReceivableOrderTable.C_INVOICE_PERSON)); }
            set { SetData(FinAccountsReceivableOrderTable.C_INVOICE_PERSON, value); }
        }
		
        public DateTime InvoiceDate
        {
            get { return Convert.ToDateTime(GetData(FinAccountsReceivableOrderTable.C_INVOICE_DATE)); }
            set { SetData(FinAccountsReceivableOrderTable.C_INVOICE_DATE, value); }
        }
		
        public decimal TotalAmount
        {
            get { return Convert.ToDecimal(GetData(FinAccountsReceivableOrderTable.C_TOTAL_AMOUNT)); }
            set { SetData(FinAccountsReceivableOrderTable.C_TOTAL_AMOUNT, value); }
        }
		
        public decimal InvoiceAmount
        {
            get { return Convert.ToDecimal(GetData(FinAccountsReceivableOrderTable.C_INVOICE_AMOUNT)); }
            set { SetData(FinAccountsReceivableOrderTable.C_INVOICE_AMOUNT, value); }
        }
		
        public decimal ReceivedAmount
        {
            get { return Convert.ToDecimal(GetData(FinAccountsReceivableOrderTable.C_RECEIVED_AMOUNT)); }
            set { SetData(FinAccountsReceivableOrderTable.C_RECEIVED_AMOUNT, value); }
        }
		
        public string PaidPerson
        {
            get { return Convert.ToString(GetData(FinAccountsReceivableOrderTable.C_PAID_PERSON)); }
            set { SetData(FinAccountsReceivableOrderTable.C_PAID_PERSON, value); }
        }
		
        public DateTime PaidDate
        {
            get { return Convert.ToDateTime(GetData(FinAccountsReceivableOrderTable.C_PAID_DATE)); }
            set { SetData(FinAccountsReceivableOrderTable.C_PAID_DATE, value); }
        }
		
        public string Status
        {
            get { return Convert.ToString(GetData(FinAccountsReceivableOrderTable.C_STATUS)); }
            set { SetData(FinAccountsReceivableOrderTable.C_STATUS, value); }
        }
		
        public string Currency
        {
            get { return Convert.ToString(GetData(FinAccountsReceivableOrderTable.C_CURRENCY)); }
            set { SetData(FinAccountsReceivableOrderTable.C_CURRENCY, value); }
        }
		
        public string InvoiceNo
        {
            get { return Convert.ToString(GetData(FinAccountsReceivableOrderTable.C_INVOICE_NO)); }
            set { SetData(FinAccountsReceivableOrderTable.C_INVOICE_NO, value); }
        }
		
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(FinAccountsReceivableOrderTable.C_CREATED_DATE)); }
            set { SetData(FinAccountsReceivableOrderTable.C_CREATED_DATE, value); }
        }
		
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(FinAccountsReceivableOrderTable.C_CREATED_BY)); }
            set { SetData(FinAccountsReceivableOrderTable.C_CREATED_BY, value); }
        }
		
        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(FinAccountsReceivableOrderTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(FinAccountsReceivableOrderTable.C_LAST_MODIFIED_DATE, value); }
        }
		
        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(FinAccountsReceivableOrderTable.C_LAST_MODIFIED_BY)); }
            set { SetData(FinAccountsReceivableOrderTable.C_LAST_MODIFIED_BY, value); }
        }
		
        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(FinAccountsReceivableOrderTable.C_APPROVED_DATE)); }
            set { SetData(FinAccountsReceivableOrderTable.C_APPROVED_DATE, value); }
        }
		
        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(FinAccountsReceivableOrderTable.C_APPROVED_BY)); }
            set { SetData(FinAccountsReceivableOrderTable.C_APPROVED_BY, value); }
        }
		
        public string Remark
        {
            get { return Convert.ToString(GetData(FinAccountsReceivableOrderTable.C_REMARK)); }
            set { SetData(FinAccountsReceivableOrderTable.C_REMARK, value); }
        }
		
		#endregion
	}
	
	
}	

